partition
Partitions this content based on the given predicate.
This function classifies the content and organizes it into a pair, grouping the items that matched vs didn't match the predicate.
Except for the ClipData items, the returned objects will contain all the same metadata as this ContentInfoCompat.
Return
A pair containing the partitioned content. The pair's first object will have the content that matched the predicate, or null if none of the items matched. The pair's second object will have the content that didn't match the predicate, or null if all of the items matched.
Parameters
The predicate to test each ClipData.Item to determine which partition to place it into.
Partitions content based on the given predicate.
This function classifies the content and organizes it into a pair, grouping the items that matched vs didn't match the predicate.
Except for the ClipData items, the returned objects will contain all the same metadata as the passed-in ContentInfo.
Return
A pair containing the partitioned content. The pair's first object will have the content that matched the predicate, or null if none of the items matched. The pair's second object will have the content that didn't match the predicate, or null if all of the items matched.
Parameters
payload to add to returned pair.
The predicate to test each ClipData.Item to determine which partition to place it into.